import QtQuick 2.0
import QtQuick.Layouts 1.14

Item {
    id:root
    implicitHeight: cleanIcon.implicitHeight + 10
    implicitWidth: cleanIcon.implicitWidth * 2 + 5

    signal closeWin()

    Rectangle{
        anchors.fill: parent
        radius: 10
        color: '#FFF'

        RowLayout{
           anchors.fill: parent
           spacing:0

           Rectangle{
              scale: .7
              Layout.fillHeight: true
              Layout.fillWidth: true

              Image {
                  id: cleanIcon
                  scale: 1
                  source: "qrc:/imgs/clean.png"
                  anchors.centerIn: parent
              }
              Text {
                  text: qsTr("Normal")
                  font.pixelSize: 22
                  font.bold: true
                  anchors.bottom: parent.bottom
                  anchors.bottomMargin: -18
                  anchors.horizontalCenter: parent.horizontalCenter
              }
              MouseArea{
                  anchors.fill: parent

                  onPressed: {
                      parent.scale *= .9
                      printControl.clean()
                  }
                  onReleased: {
                     parent.scale /= .9
                     root.closeWin()
                  }
              }
           }

           Rectangle{
               Layout.fillHeight: true
               Layout.fillWidth: true
               scale: .7
               Image {
                   id: name1
                   scale: 1
                   source: "qrc:/imgs/clean1.png"
                   anchors.centerIn: parent
               }
               Text {
                   text: qsTr("Powerful")
                   font.pixelSize: 22
                   font.bold: true
                   anchors.bottom: parent.bottom
                   anchors.bottomMargin: -18
                   anchors.horizontalCenter: parent.horizontalCenter
               }
               MouseArea{
                   anchors.fill: parent

                   onPressed: {
                       parent.scale *= .9
                       printControl.clean()
                   }
                   onReleased: {
                       parent.scale /= .9
                       root.closeWin()
                   }
               }
           }
        }
    }
}
